using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Admin_TestEditor : AdminPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            eSubmittedDataBlock.Visible = false;

            // Automatically calculates the editor base path based on the _samples directory.
            // This is usefull only for these samples. A real application should use something like this:
            // FCKeditor1.BasePath = '/FCKeditor/' ;	// '/FCKeditor/' is the default value.
            string sPath = this.ResolveUrl("~/Admin/FCKeditor/");

            editContent.BasePath = sPath;
            editContent.Value = "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKeditor</a>.";
            editContent.ImageBrowserURL = sPath + "editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx";
            editContent.LinkBrowserURL = sPath + "editor/filemanager/browser/default/browser.html?Connector=connectors/aspx/connector.aspx";
        }
    }

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        eSubmittedDataBlock.Visible = true;
        txtSubmitted.Value = HttpUtility.HtmlEncode(editContent.Value);
    }
}
